GXGetStyleAttributes
You can use theGXGetStyleAttributes
function to determine which style attributes are set for a particular style object.
gxStyleAttribute GXGetStyleAttributes(gxStyle source);
source
- A reference to the style object whose style attributes you want to determine.
- function result
- The style attributes associated with the source style object.
DESCRIPTION
TheGXGetStyleAttributes
function returns as its function result the style attributes of the style object specified by thesource
parameter.As an example, to examine the
gxSourceGridStyle
flag of a style object referenced by the variablesource
, you could use this code:
if (GXGetStyleAttributes(source) & gxSourceGridStyle) { /* style has gxSourceGridStyle attribute set */ }ThegxCenterFrameStyle
attribute is set only if both thegxInsideFrameStyle
and thegxOutsideFrameStyle
attributes are clear, so if you want to test for a centered frame style you need this code:
if (GXGetStyleAttributes(source) & (gxInsideFrameStyle | gxOutsideFrameStyle) == gxCenterFrameStyle) { /* style has gxCenterFrameStyle attribute set */ }ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory style_is_nil SEE ALSO
For a discussion of style attributes, see "Style Attributes" on page 3-98.For an example of pen placement, see "Manipulating Pen Width and Placement" on page 3-51.
For an example of constraining shapes to grids, see "Constraining Shape Geometries to Grids" on page 3-40 and "Constraining Shapes to Device Grids" on page 3-42.
To examine the style attributes of a style object associated with a particular shape, use the
GXGetShapeStyleAttributes
function, which is described on page 3-112.To alter the style attributes of a style object, use the
GXSetStyleAttributes
function, which is described in the next section.To alter the style attributes of a style object associated with a particular shape, use the
GXSetShapeStyleAttributes
function, which is described on page 3-113.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help